package com.adv.ems.filters.original.dto;

import com.adv.ems.db.entity.EnergyDataOriginalDO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

@EqualsAndHashCode(callSuper = true)
@Data
public class EnergyDataOriginalBeforeDTO extends EnergyDataOriginalDO {
    private Double realValue;

    public static EnergyDataOriginalBeforeDTO from(EnergyDataOriginalDO original) {
        EnergyDataOriginalBeforeDTO dto = new EnergyDataOriginalBeforeDTO();
        BeanUtils.copyProperties(original, dto);
        return dto;
    }
}
